Optimal. Leaf size=84 \[ -\frac{i (c+d x)}{2 f (a+i a \cot (e+f x))}+\frac{(c+d x)^2}{4 a d}+\frac{d}{4 f^2 (a+i a \cot (e+f x))}+\frac{i d x}{4 a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0536668, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3723, 3479, 8} \[ -\frac{i (c+d x)}{2 f (a+i a \cot (e+f x))}+\frac{(c+d x)^2}{4 a d}+\frac{d}{4 f^2 (a+i a \cot (e+f x))}+\frac{i d x}{4 a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3723
Rule 3479
Rule 8
Rubi steps
\begin{align*} \int \frac{c+d x}{a+i a \cot (e+f x)} \, dx &=\frac{(c+d x)^2}{4 a d}-\frac{i (c+d x)}{2 f (a+i a \cot (e+f x))}+\frac{(i d) \int \frac{1}{a+i a \cot (e+f x)} \, dx}{2 f}\\ &=\frac{(c+d x)^2}{4 a d}+\frac{d}{4 f^2 (a+i a \cot (e+f x))}-\frac{i (c+d x)}{2 f (a+i a \cot (e+f x))}+\frac{(i d) \int 1 \, dx}{4 a f}\\ &=\frac{i d x}{4 a f}+\frac{(c+d x)^2}{4 a d}+\frac{d}{4 f^2 (a+i a \cot (e+f x))}-\frac{i (c+d x)}{2 f (a+i a \cot (e+f x))}\\ \end{align*}
Mathematica [A] time = 0.22995, size = 107, normalized size = 1.27 \[ \frac{(\cos (e+f x)+i \sin (e+f x)) \left (\left (2 c f (2 f x+i)+d \left (2 f^2 x^2+2 i f x-1\right )\right ) \cos (e+f x)-i \left (2 c f (2 f x-i)+d \left (2 f^2 x^2-2 i f x+1\right )\right ) \sin (e+f x)\right )}{8 a f^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.143, size = 139, normalized size = 1.7 \begin{align*}{\frac{1}{1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2}} \left ({\frac{d{x}^{2}}{4\,a}}-{\frac{-2\,icf+d}{4\,a{f}^{2}}}+{\frac{d{x}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{4\,a}}-{\frac{ \left ( id+2\,cf \right ) \tan \left ( fx+e \right ) }{4\,a{f}^{2}}}+{\frac{ \left ( id+2\,cf \right ) x}{4\,af}}-{\frac{dx\tan \left ( fx+e \right ) }{2\,af}}+{\frac{ \left ( -id+2\,cf \right ) x \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{4\,af}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.60447, size = 117, normalized size = 1.39 \begin{align*} \frac{2 \, d f^{2} x^{2} + 4 \, c f^{2} x +{\left (2 i \, d f x + 2 i \, c f - d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}}{8 \, a f^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.328362, size = 116, normalized size = 1.38 \begin{align*} \begin{cases} \frac{\left (2 i a c f^{2} e^{2 i e} + 2 i a d f^{2} x e^{2 i e} - a d f e^{2 i e}\right ) e^{2 i f x}}{8 a^{2} f^{3}} & \text{for}\: 8 a^{2} f^{3} \neq 0 \\- \frac{c x e^{2 i e}}{2 a} - \frac{d x^{2} e^{2 i e}}{4 a} & \text{otherwise} \end{cases} + \frac{c x}{2 a} + \frac{d x^{2}}{4 a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.25435, size = 90, normalized size = 1.07 \begin{align*} \frac{2 \, d f^{2} x^{2} + 4 \, c f^{2} x + 2 i \, d f x e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i \, c f e^{\left (2 i \, f x + 2 i \, e\right )} - d e^{\left (2 i \, f x + 2 i \, e\right )}}{8 \, a f^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]